<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
    <title>华为 5680T GPON注册ONU脚本生成器</title>
	<style>
		html, body{margin: 0;}
		.head, .foot{background-color: #000;color: #fff;text-align: center;}
		.side{background-color: #a09540;}
		.main{background-color: #909540;}


		html, body{height: 100%;}
		body{display: flex;flex-flow: column;}
		.head, .foot{height: 70px;}
		.body{flex: 1;display: flex;}
		.side{width: 300px;}
		.main{flex: 1;}
	
	</style>
</head>
<body>
	<div class="head"><h1>华为MA5680T ONU注册脚本在线生成器</div>

	<div class="body">
		<div class="side">

			
 <form action="表单接口" method="post">
             
             <fieldset>

				<br>
				
				<div>
					<label>终端序号：</label>
					<input type="text" size="10" id="onu-number">
				</div>
		
				
				<div>
					<label>终端--SN：</label>
					<input type="text" size="20"  id="onu-sn">
					<label></label>
				</div>
             	
				
				
				<div>
					<label for="underwrite">终端别名：</label>
					<!-- <textarea name="underwrite" rows="1" cols="40" id="underwrite"></textarea> -->
					<input type="text" size="10" id="onu-desc">
				</div>
				<br>
				<div>
					<label>所属gem索引(gemport-index)：</label><br>
					<input type="text" size="10"  id="onu-gem">
					<label></label>
				</div>
				<div>
					<label>所属业务VLAN：</label><br>
					<input type="text" size="10"  id="onu-ywvlan">
					<label></label>
				</div>
				
				<div>
					<label>业务模板（ont-lineprofile-id）：</label>
					<input type="text" size="10"  id="onu-glvlan">
					<label></label>
				</div>
				<br>
				<label >所属GPON端口</label><br><br>
				<div>
					<label >框..........</label>
					<select onclick="kuang_click(this)">
						<option id="onu-kuang" value="0">0号框</option>
						<option id="onu-kuang" value="1">1号框</option>
						<option id="onu-kuang" value="2">2号框</option>
						<option id="onu-kuang" value="3">3号框</option>
						<option id="onu-kuang" value="4">4号框</option>
						<option id="onu-kuang" value="5">5号框</option>
						<option id="onu-kuang" value="6">6号框</option>
						<option id="onu-kuang" value="7">7号框</option>
					</select>
				</div>
				
				<div>
					<label >槽..........</label>
					<select onclick="ban_click(this)">
						<option id="onu-ban" value="1">1号槽</option>
						<option id="onu-ban" value="2">2号槽</option>
						<option id="onu-ban" value="3">3号槽</option>
						<option id="onu-ban" value="4">4号槽</option>
						<option id="onu-ban" value="5">5号槽</option>
						<option id="onu-ban" value="6">6号槽</option>
						<option id="onu-ban" value="7">7号槽</option>
						<option id="onu-ban" value="8">8号槽</option>
					</select>
				</div>
				
				<div>
					<label >口..........</label>
					<select onclick="kou_click(this)">
						<option id="onu-kou" value="0">0号口</option>
						<option id="onu-kou" value="1">1号口</option>
						<option id="onu-kou" value="2">2号口</option>
						<option id="onu-kou" value="3">3号口</option>
						<option id="onu-kou" value="4">4号口</option>
						<option id="onu-kou" value="5">5号口</option>
						<option id="onu-kou" value="6">6号口</option>
						<option id="onu-kou" value="7">7号口</option>
						</select>
				</div>
				
				
 </fieldset> 

		</from>
		<br>
			<div style="text-align: center;">
				<br>
			<input type="button" value="生成ONU注册脚本" onclick="showhaha();" /><br><br>

			<input type="button" value="查看常用命令" onclick="showdisplay();" /><br><br>

			<input type="button" value="备用按钮" onclick="showback();" />
		</div>


	
		</div>


		<div class="main">


<script type="text/javascript">

var kuang="0"; ban="1"; kou="0";

function kuang_click(obj){
    this.kuang=(obj.value=='0'?'0':(obj.value=='1'?'1':(obj.value=='2'?'2':(obj.value=='3'?'3':(obj.value=='4'?'4':(obj.value=='5'?'5':(obj.value=='6'?'6':'7')))))));
}
;
function ban_click(obj){
    this.ban=(obj.value=='8'?'8':(obj.value=='1'?'1':(obj.value=='2'?'2':(obj.value=='3'?'3':(obj.value=='4'?'4':(obj.value=='5'?'5':(obj.value=='6'?'6':'7')))))));
}
;
function kou_click(obj){
    this.kou=(obj.value=='0'?'0':(obj.value=='1'?'1':(obj.value=='2'?'2':(obj.value=='3'?'3':(obj.value=='4'?'4':(obj.value=='5'?'5':(obj.value=='6'?'6':'7')))))));
}
;



function showhaha()
{
var number=document.getElementById("onu-number");
var sn=document.getElementById("onu-sn");
var desc=document.getElementById("onu-desc");
var gem=document.getElementById("onu-gem");
var ywvlan=document.getElementById("onu-ywvlan");
var glvlan=document.getElementById("onu-glvlan");
var interfacegpon=kuang+"/"+ban;

var gaga=document.getElementById("showgaga");

gaga.innerText ="telnet成功登陆后，直接复制下列代码即可:"+"\n"+"\n"+"en"+"\n"+"config"+"\n"+"switch language-mode"+"\n"+"\n"+"interface gpon "+interfacegpon+"\n"+"ont add "+kou+" "+number.value+" sn-auth "+sn.value+" omci ont-lineprofile-id "+glvlan.value+" ont-srvprofile-id "+glvlan.value+" desc "+desc.value+"\n"+"ont port native-vlan "+kou+" "+number.value+" eth 1 vlan "+ywvlan.value+"\n"+"\n"+"\n"+"quit"+"\n"+"service-port vlan "+ywvlan.value+" gpon "+interfacegpon+"/"+kou+" ont "+number.value+" gemport "+gem.value+" multi-service user-vlan "+ywvlan.value+" tag-transform translate"+"\n"+"\n"+"display board 0/1"+"\n"+"\n";

//alert(gaga.innerText);
}

function showdisplay(){
	var number=document.getElementById("onu-number");
	var sn=document.getElementById("onu-sn");
	var desc=document.getElementById("onu-desc");
	var gem=document.getElementById("onu-gem");
	var ywvlan=document.getElementById("onu-ywvlan");
	var glvlan=document.getElementById("onu-glvlan");
	var interfacegpon=kuang+"/"+ban;
	var gaga=document.getElementById("showgaga");
 
	gaga.innerText = "全局（config)下常用命令"+"\n" + "1. display board 0/1    ~查看1号板卡下所有ONU终端注册信息"+"\n"+"2. display service-port all  ~查看虚拟业务端口列表"+"\n"+"3. undo service-port x   ~删除 第X个 虚拟业务端口"+"\n"+"4. switch language-mode  ~切换显示语种" + "\n"+"\n"+"端口配置（interface gpon 0/1)模式下常用命令" + "\n" +"1. display board 0/1   ~查看1号板卡下所有ONU终端注册信息" +"\n"+"2. display ont info [端口号] [终端序号]           ~查看某端口下单个ONU注册信息"+"\n"+"3. ont delete [端口号] [终端序号]      ~删除某端口下的某个ONU终端(需先删除终端虚拟业务口）"+"\n"+"4. display ont optical-info [端口号] [终端序号]";
}

function showback(){
	var number=document.getElementById("onu-number");
	var sn=document.getElementById("onu-sn");

	var desc=document.getElementById("onu-desc");
	var gaga=document.getElementById("showgaga");


	gaga.innerText ="";
}



</script>
<br>


 <p style="font-size:18px ;font-weight:bold; color:#307010" id="showgaga">欢迎使用华为5680T GPON ONU注册脚本生成器，<br>此在线生成器生成“SN”认证ONU注册脚本代码，不支持 ”WINDOWS XP“系统（生成脚本功能正常，但会出现版面错乱情况，为加速XP更替，特此不做兼容代码。）<br><br> 请填写好各项后点击“生成脚本“按钮。 </p>
		





         </div>


	</div>

	<div class="foot">测试版本    如发现BUG，欢迎回帖或微信联系 <br>      <a href="http://fscatv.com/sudk001/images/weixin%202ma.jpg">联系编写者：点击查看微信二维码</a></div>
</body>
</html>